-- **********************************************************************
-- EOSN-FCPING-MIB: McDATA EOSN FC Ping Enterprise MIB (SMIv2).
--
--
-- REVISION HISTORY
-- Date      PRG  Description
-- ======================================================================
-- Release 1.0
--
-- 07/18/05  vk  Initial version
--
-- Copyright (c) 2005 McDATA Corp.  All rights reserved.
-- **********************************************************************
--
EOSN-FCPING-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, OBJECT-IDENTITY,
    NOTIFICATION-TYPE, TimeTicks, IpAddress, 
    Counter32, Counter64, Integer32, 
    Unsigned32, Gauge32                         FROM SNMPv2-SMI

    TEXTUAL-CONVENTION, TruthValue, 
    RowStatus, DisplayString, TimeStamp         FROM SNMPv2-TC

    MODULE-COMPLIANCE, OBJECT-GROUP             FROM SNMPv2-CONF

    SnmpAdminString                             FROM SNMP-FRAMEWORK-MIB
    FcAddressId,
    FcNameId                                    FROM FCMGMT-MIB
    
    eosnModules, eosnMIB                        FROM  EOSN-REG
    
    BbFcAddrType,
    BbEnabledStatus,
    BbPortIndex,
    BbRowStatusWithoutNotInService,
    BbDomainId                                  FROM EOSN-TC

    fcPing,
    bbTrapLogSeqNum,
    bbSysSwitchName,
    bbSysSwitchId,
    bbVfID                                      FROM  EOSN-MIB
     
    bbNotifications                             FROM EOSN-TRAP-MIB;


eosnFcPingModule MODULE-IDENTITY
        LAST-UPDATED    "0507180000Z"
        ORGANIZATION    "McDATA Corporation"
        CONTACT-INFO
        "       McDATA Corporation

        Postal: 4555 Great America Pkw, Suite 401
                Santa Clara, CA 95054 
                USA
 
           Tel: +1-800.752.4572
        E-mail: support@mcdata.com
           Web: www.mcdata.com

       "
        DESCRIPTION
        "This MIB module describes Fibre channel Ping feature 
        supported on the Interprid 10k family."
        REVISION        "200507180000Z"
        DESCRIPTION
        "Initial version of this module."
        ::= { eosnModules 8 }

-- Fibre Channel Ping request table.

fcPingGlobalTable  OBJECT-TYPE
--PSIM(Modif)     SYNTAX      SEQUENCE OF FcPingEntry
    SYNTAX      SEQUENCE OF FcPingGlobalEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table for finding the index to use for creating a fcPingEntry by
        a snmp client application."
    ::= { fcPing 1 }

fcPingGlobalEntry OBJECT-TYPE
    SYNTAX      FcPingGlobalEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry of the available index to create into fc ping table."
    INDEX   { bbVfID }
    ::= { fcPingGlobalTable 1}

FcPingGlobalEntry ::=
    SEQUENCE {
        fcPingAvailableIndex      Unsigned32
    }

fcPingAvailableIndex  OBJECT-TYPE
    SYNTAX      Unsigned32 (1..2147483647)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An unused index in the fcPingTable.  When management applications
        create a new row in the fcPingTable, they may (but are not required
        to) read fcPingAvailableIndex to choose an index value for the new row.
        If fcPingAvailableIndex is read twice in succession, it may return
        the same value.  An index is not reserved until a management application
        uses it to set fcPingRowStatus to createAndGo(4).
        If two management stations happen to create a new row at the same time,
        the second createAndWait operation fails, and the second management station
        must repeat the index selection process.
        If no more indexes are available, fcPingAvailableIndex returns 0."
    ::= { fcPingGlobalEntry 1 }

fcPingTable  OBJECT-TYPE
    SYNTAX      SEQUENCE OF FcPingEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table for configuring ping request."
    ::= { fcPing 2 }

fcPingEntry OBJECT-TYPE
    SYNTAX      FcPingEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An request entry of the fc ping table."
    INDEX   { bbVfID, fcPingIndex }
    ::= { fcPingTable 1}

FcPingEntry ::=
    SEQUENCE {
        fcPingIndex               Unsigned32, 
        fcPingAdminStatus         BbEnabledStatus,
        fcPingOperStatus          INTEGER,
        fcPingErrorCode           INTEGER,
        fcPingTrapEnable          TruthValue,
        fcPingAddrType            BbFcAddrType,
        fcPingDestinationPort     OCTET STRING,
        fcPingPacketCount         Integer32,
        fcPingPayloadSize         Integer32,
        fcPingPacketTimeout       Integer32,
        fcPingRowStatus           BbRowStatusWithoutNotInService
    }

fcPingIndex OBJECT-TYPE
    SYNTAX      Unsigned32 (1..2147483647)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A unique index to identify ping request entry."
    ::= { fcPingEntry 1 }

fcPingAdminStatus OBJECT-TYPE
    SYNTAX  BbEnabledStatus    
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The Admin or desired state. If the state is enabled(1) then the 
         ping request is/(will be) activated.  If it is in disabled(2)
         state, then it has been deactivated or completed."
    DEFVAL { disabled }
    ::= { fcPingEntry 2 }

fcPingOperStatus OBJECT-TYPE
    SYNTAX      INTEGER {
        inProgress(1),
        success(2),
        partialSucess(3),
        failed(4),
        disabled(5)
    }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The operational status of this entry."
    ::= { fcPingEntry 3 }

fcPingErrorCode OBJECT-TYPE
    SYNTAX      INTEGER {
        noError(0),
        unknownReason(1),
        notSupportedInNextSwitch(2),
        noResponseFromNextSwitch(3),
        destinationPortNotInFabric(4),
        domainNotInFabric(5)
    }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The error code returned for this entry.  When the 
        bbFcPingOperStatus object is in inProgress or success or state,
        then this object will be have noError(0) value.  If there is a Vendor 
        specific error code, then it will have a value between 0xfo & 0xff.
        All other values are reserved."
    ::= { fcPingEntry 4 }

fcPingTrapEnable OBJECT-TYPE
    SYNTAX TruthValue 
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object indicates whether bbFcPingCompleted notification
         is true (enabled) or false (disabled) for this entry.   If set to
         true, then a notification is generated when the request is compeleted
         otherwise it doesn't."
    DEFVAL { false }
    ::= { fcPingEntry 5 }

fcPingAddrType OBJECT-TYPE
    SYNTAX BbFcAddrType 
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The address type of this instance. The default value is World Wide 
        name of the port."
    DEFVAL { wwn }
    ::= { fcPingEntry 6 }

fcPingDestinationPort OBJECT-TYPE
    SYNTAX OCTET STRING (SIZE (3 | 8))
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object can be the World Wide Name or FC ID of the port.  
        This is the destination port to which the ping should be sent."
    ::= { fcPingEntry 7 }

fcPingPacketCount OBJECT-TYPE
    SYNTAX Integer32(1..10) 
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The number of ping packets to be sent to the destination for this 
        request.  This object can only be modified when fcPingAdminStatus 
        object is set to 'disabled'" 
    DEFVAL { 5 }
    ::= { fcPingEntry 8 }

fcPingPayloadSize OBJECT-TYPE
    SYNTAX Integer32(0..1884) 
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The size of the ping packet payload to be sent to the destination for 
        this request.  This object can only be modified when 
        fcPingAdminStatus object is set to 'disabled'" 
    DEFVAL { 0 }
    ::= { fcPingEntry 9 }

fcPingPacketTimeout OBJECT-TYPE
    SYNTAX Integer32(1..10) 
    UNITS "seconds"
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The amount of time to wait for a ping response to be received for this 
        request before marking it as lost.  This object can only be modified 
        when fcPingAdminStatus object is set to 'disabled'" 
    DEFVAL { 5 }
    ::= { fcPingEntry 10 }

fcPingRowStatus OBJECT-TYPE
    SYNTAX BbRowStatusWithoutNotInService 
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object is used to create a new row or modify or delete 
        an existing row in this table."
    ::= { fcPingEntry 12 }

-- Fibre Channel  ping statistics table
-- This table contains the result of the ping request
-- performed on an entry in the fcPingTable

fcPingResponseTable  OBJECT-TYPE
    SYNTAX      SEQUENCE OF FcPingResponseEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table for of fibre channel ping results."
    ::= { fcPing 3 }

fcPingResponseEntry OBJECT-TYPE
    SYNTAX      FcPingResponseEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A stats entry the fc ping.
        There are 2 index to this table.  fcPingIndex
        identifies the fcPingEntry that a 
        fcPingResponseEntry belongs and bbVfID which specifies the VF on
        which this request was performed.
        The entries are automatically created whenever the ping is
        sucessfully/partially-sucesssfully executed.   They are
        deleted whenever fcPingEntry is deleted or when the 
        request ages out."
    INDEX   { bbVfID, fcPingIndex }
    ::= { fcPingResponseTable 1}

FcPingResponseEntry ::=
    SEQUENCE {
        fcPingTxPackets     Unsigned32,
        fcPingRxPackets     Unsigned32,
        fcPingMinRtt        Unsigned32,
        fcPingMaxRtt        Unsigned32,
        fcPingAvgRtt        Unsigned32,
        fcPingNumTimeout    Unsigned32
    }


fcPingTxPackets OBJECT-TYPE
    SYNTAX Unsigned32 
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of packets sent to the destination for this request."
    ::= { fcPingResponseEntry 1 }

fcPingRxPackets OBJECT-TYPE
    SYNTAX Unsigned32 
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of packets received from the destination for this request."
    ::= { fcPingResponseEntry 2 }

fcPingMinRtt OBJECT-TYPE
    SYNTAX Unsigned32 
    UNITS "microseconds"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The minimum round trip time taken to this destination among all the
        packets sent for this particular request."
    ::= { fcPingResponseEntry 3 }

fcPingMaxRtt OBJECT-TYPE
    SYNTAX Unsigned32 
    UNITS "microseconds"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The maximum round trip time taken to this destination among all the
        packets sent for this particular request."
    ::= { fcPingResponseEntry 4 }

fcPingAvgRtt OBJECT-TYPE
    SYNTAX Unsigned32 
    UNITS "microseconds"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The average round trip time taken to this destination among all the
        packets sent for this particular request."
    ::= { fcPingResponseEntry 5 }

fcPingNumTimeout OBJECT-TYPE
    SYNTAX Unsigned32 
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of timeouts seen for this request."
    ::= { fcPingResponseEntry 6 }


-- Notifications
fcPingCompleted NOTIFICATION-TYPE
    OBJECTS {   
        bbVfID,
        fcPingIndex,
        fcPingAddrType,
        fcPingDestinationPort,
        fcPingOperStatus,
        fcPingErrorCode,
        fcPingTxPackets,
        fcPingRxPackets,
        fcPingMinRtt,
        fcPingMaxRtt,
        fcPingAvgRtt,
        fcPingNumTimeout,
        bbTrapLogSeqNum,
        bbSysSwitchName,
        bbSysSwitchId
            }
    STATUS  current
    DESCRIPTION
        "The Trap is sent whenever the fibre channel ping request is
         completed & only if fcPingTrapEnable is set to true."
    ::= { bbNotifications 85 }


END